package com.guigu.community.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@TableName("orders")
public class Orders {
    private Integer id;             // 订单ID
    private String orderId;        // 订单编号
    private Integer userId;        // 用户ID
    private Integer totalNumber;   // 商品总数量
    private BigDecimal totalAmount; // 商品总金额
    private String addressId;        // 自提点地址

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;        // 下订单时间

    private Integer status;        // 订单状态


    @TableField(exist = false)
    private List<OrderItems> orderItems;

    @TableField(exist = false)
    private Users users;

    @TableField(exist = false)
    private Merchants merchants;

}
